package com.jackson.springaop.aspect;

/*
 * Author: JacksonCoder
 * FileName: LoggingAspect
 * Version: 1.0.0
 * Date: 2025/6/25
 */

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LoggingAspect {

    @Before("execution(* com.jackson.springaop.controller.IndexController.*(..))")
    public void BeforeMethod(){
        System.out.println("【开始】执行方法...");
    }

    @After("execution(* com.jackson.springaop.controller.IndexController.*(..))")
    public void AfterMethod(){
        System.out.println("【结束】执行方法...");
    }

}
